package com.gzxw.mogublog.utils;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @program: mogublog
 * @author: gzxw
 * @create: 2023-04-27 11:00
 **/
public class ServletUtils {

    public static void renderString(HttpServletResponse response, String message) {
        try {
            response.setStatus(200);
            response.setContentType("application/json");
            response.setCharacterEncoding("utf-8");
            response.getWriter().print(message);
        } catch (IOException e) {
            e.printStackTrace();
        }

    }

}
